<div id="sidebar">

	<div class="block">
		<h3>Author</h3>
		<img src="/themes/{{ blog.theme_name }}/images/author.gif" alt="Author" style="float: left; margin: 0 10px 0 -3px; padding: 0;" />
		<p>Howdy! I'm Denis and this is my blog.</p>
	</div>
{% if categories %}
	<div class="block">
		<h3>Categories</h3>
		<ul>
		    {%for cate in categories%}
		  <li>	<a href="/category/{{cate.slug}}">{{cate.name}}({{cate.count}})</a></li>
		 	{%endfor%}
		</ul>

	</div>
{% endif %}

	<div class="block">
		<h3>Blogroll</h3>
		<ul>
		{%for link in blogroll%}
		<li><a href="{{link.href}}">{{link.linktext}}</a></li>
		{%endfor%}
		</ul>

	</div>

	<div class="block">
		<h3>Meta</h3>
		<ul>
		<li class="page_item" ><a href="{{blog.feedurl}}">(RSS)</a></li>
		{% block topmenu %}{% endblock %}

		{%if self.is_admin%}
		<li><a href="/admin/post">Write</a> </li>
		 <li><a href="/admin">Admin</a> </li>
		{%endif%}
		  <li>
		 {%if self.is_login%}

		   <a href="{{self.logouturl}}">Logout</a>

		 {%else%}
		   <a href="/admin">Login</a>

		 {%endif%}
		     </li>

		</ul>

	</div>

</div>